<!--<?php
print <<<EOT
-->

<td valign="top">
<table width="100%"  border="0" cellspacing="10" cellpadding="0">
<tr>
<td align="left" valign="top">
                
<table width="100%" border="0" cellspacing="0" cellpadding="0">

<!--
EOT;
if (!$search_rs) {    
print <<<EOT
-->         
        
  <tr>
    <td height="25" valign="top" class="ytitle">Product Advanced Search</td>
  </tr>
  <form action="products_search.php"  method="post">
    <tr>
      <td align="center" valign="top"><table width="95%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="85" height="30" align="left">Product Name:</td>
            <td align="left"><input type="text" name="s_name" style="width:160px">
              keywords</td>
          </tr>
          <tr>
            <td width="85" height="30" align="left">Author:</td>
            <td align="left"><input type="text" name="s_author" style="width:160px">
              keywords</td>
          </tr>
          <tr>
            <td width="85" height="30" align="left">Publisher:</td>
            <td align="left"><input type="text" name="s_publisher" style="width:160px">
            </td>
          </tr>
          <tr>
            <td width="85" height="30" align="left">Type:</td>
            <td align="left"><select name="s_type">
                <option selected value="0">- Select -</option>
            
<!--
EOT;
foreach ($type_name_ary as $k=>$v) {    
print <<<EOT
-->         
        
              <option value="$k">$v</option>
        
<!--
EOT;
}
print <<<EOT
-->  
                    
              </select></td>
          </tr>
          <tr>
            <td height="30" align="left">Category:</td>
            <td align="left"><select name="s_category">
                <option selected value="0">- Select -</option>
                
<!--
EOT;
foreach ($category_name_ary as $k=>$v) {    
print <<<EOT
-->         

                <option value="$k">$v</option>
        
<!--
EOT;
}
print <<<EOT
-->                  
                
              </select></td>
          </tr>
        </table>
        <table width="95%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="50" align="center" valign="bottom"><input name="Submit" type="submit" class="inputbt" value="Search"></td>
          </tr>
        </table></td>
    </tr>
  <input name="act" type="hidden" value="asearch">
  </form>
        
<!--
EOT;
} else {
print <<<EOT
-->   

  <tr>
    <td height="25" valign="top" class="ytitle">Product Search Result </td>
  </tr>
  <tr>
    <td align="left" valign="top" >Searched by &quot;{$searchtext}&quot;</td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top" >Total {$total} items</td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><table width="100%" height="30"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top"><table width="100%"  border="0" cellspacing="1" cellpadding="5">
              <tr align="left" bgcolor="#b5c3d6">
                <td bgcolor="#b5c3d6" class="white8">Product Name</td>
                <td bgcolor="#b5c3d6" class="white8">Type</td>
                <td bgcolor="#b5c3d6" class="white8">Category</td>
              </tr>
              
<!--
EOT;
foreach ($products_list_ary as $k=>$v) {    
print <<<EOT
-->         
        
              <tr align="center" bgcolor="#e0e7ee">
                <td align="left" bgcolor="#e0e7ee" ><a href="products_info.php?id={$v['id']}" target="_blank">{$v['name']}</td>
                <td align="left" bgcolor="#e0e7ee" >{$type_str_ary[$v['id']]}</td>
                <td align="left" bgcolor="#e0e7ee" >{$category_str_ary[$v['id']]}</td>
              </tr>
        
<!--
EOT;
}
print <<<EOT
-->                  
              
            </table></td>
        </tr>
      </table></td>
  </tr>

<!--
EOT;
}
print <<<EOT
-->  

</table>

</td>
</tr>
</table>
</td>

<!--
EOT;
?>-->